open Graphics
open Syntax
open Binding
open Hashtbl

module TwoDRoutines : sig
    type twoDSpace
    type coordinates =  {mutable xPos : int; mutable yPos : int}
    val coord_of_string : string -> coordinates
    val string_of_coord : coordinates -> string
    val makeTwoDSpace : int->int->int->int->twoDSpace
    val stepX    : twoDSpace->int  
    val stepY    : twoDSpace->int      
    val setGrid  : int->int->twoDSpace->unit
    val getNc  :  twoDSpace->int
    val getNr  :  twoDSpace->int
               
    val coord_to_xy : coordinates->twoDSpace->(int*int)
    val xy_to_coord : int->int->twoDSpace->coordinates
    val assignCoord : int->int->coordinates->twoDSpace->unit
    val is_in_grid : int->int->twoDSpace->bool
    val coordDistSq : coordinates->coordinates->int
    
    val helpMessage : string->unit
    val draw_pixel : color->coordinates->twoDSpace->unit
    val buildCoordinates : int->int->coordinates
    val draw_grid : twoDSpace->unit
    val _x : coordinates->int
    val _y : coordinates->int
    val is_in_square_bound : int->int->(coordinates * int * int)->bool
    
    type twoDVec = {mutable c1 : coordinates; 
                        mutable tip : coordinates}
end  

open TwoDRoutines
module AntEnv : sig
	type ant = coordinates * bool ref
	type pheromones = (coordinates, int) t
	type food = (coordinates, int) t
		type antHill =  coordinates * int ref
	type env = ant list  * pheromones * food * antHill
	
	val drawEnv : env -> TwoDRoutines.twoDSpace -> unit
	val playAnt :  ?visual:bool -> (unit->bool) -> float -> context -> term -> float
	
	
end






